import request from '@/utils/request'

export function listTravel(query) {
    return request({
        url: '/travel/list',
        method: 'get',
        params: query
    })
}

export function addTravel(data) {
    return request({
        url: '/travel/addTravel',
        method: 'post',
        data: data
    })
}

export function updateTravel(data) {
    return request({
        url: '/travel/updateTravel',
        method: 'post',
        data: data
    })
}



export function reportCash(id) {
    return request({
      url: '/cash/reportCash/' + id,
      method: 'put'
    })
}

export function reportCashAgain(id) {
    return request({
      url: '/cash/reportCashAgain/' + id,
      method: 'put'
    })
}

export function getTravel(data) {
    return request({
        url: '/travel/getTravelById',
        method: 'get',
        params: data
    })
}

export function deleteTravel(travelIds) {
    return request({
        url: '/travel/deleteTravel/'+travelIds,
        method: 'delete',
    })
}
export function getTravelMainPrint(travelId) {
    return request({
        url: '/travel/getPrintMainInfo/'+travelId,
        method: 'get'
    })
}
export function getTravelPrintList(travelId) {
    return request({
        url: '/travel/getTravelPrintList/'+travelId,
        method: 'get'
    })
}
export function getTravelPrintMxList(travelId) {
    return request({
        url: '/travel/getTravelPrintMxList/'+travelId,
        method: 'get'
    })
}
//导出明细表
export function exportMx(travelId) {
    return request({
        url: '/travel/mxExport/' + travelId,
        method: 'get'
    })
}


